package com.wx.exam.service.Impl;

import com.wx.exam.dao.LoveMapper;
import com.wx.exam.pojo.Love;
import com.wx.exam.service.LoveService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author ychiha
 * @Date 2021/11/26 11:09
 * @Version 1.0
 */
@Service
public class LoveServiceImpl implements LoveService {

    @Autowired
    LoveMapper dao;

    /**
     * 添加点赞记录
     * @param love
     * @return
     */
    @Override
    public Boolean addLove(Love love) {
        int i = dao.addLove(love);
        if(i>0){
            return true;
        }else{
            return false;
        }
    }

    /**
     * 移除点赞记录
     * @param love
     * @return
     */
    @Override
    public Boolean removeLove(Love love) {
        int i = dao.removeLove(love);
        if(i>0){
            return true;
        }else{
            return false;
        }
    }
}
